package com.ruoyi.yyq.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yyq.mapper.CarUserCouponMapper;
import com.ruoyi.yyq.domain.CarUserCoupon;
import com.ruoyi.yyq.service.ICarUserCouponService;

/**
 * 用户优惠卷中间Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class CarUserCouponServiceImpl implements ICarUserCouponService 
{
    @Autowired
    private CarUserCouponMapper carUserCouponMapper;

    @Override
    public List<Long> selectCarUserCouponByUid(Long uid) {
        return carUserCouponMapper.selectCarUserCouponByUid(uid);
    }

    @Override
    public List<CarUserCoupon> selectCarUserCouponByUid1(Long uid) {
        return carUserCouponMapper.selectCarUserCouponByUid1(uid);
    }

    /**
     * 查询用户优惠卷中间
     * 
     * @param id 用户优惠卷中间主键
     * @return 用户优惠卷中间
     */
    @Override
    public CarUserCoupon selectCarUserCouponById(Long id)
    {
        return carUserCouponMapper.selectCarUserCouponById(id);
    }

    /**
     * 查询用户优惠卷中间列表
     * 
     * @param carUserCoupon 用户优惠卷中间
     * @return 用户优惠卷中间
     */
    @Override
    public List<CarUserCoupon> selectCarUserCouponList(CarUserCoupon carUserCoupon)
    {
        return carUserCouponMapper.selectCarUserCouponList(carUserCoupon);
    }

    /**
     * 新增用户优惠卷中间
     * 
     * @param carUserCoupon 用户优惠卷中间
     * @return 结果
     */
    @Override
    public int insertCarUserCoupon(CarUserCoupon carUserCoupon)
    {
        return carUserCouponMapper.insertCarUserCoupon(carUserCoupon);
    }



    /**
     * 修改用户优惠卷中间
     * 
     * @param carUserCoupon 用户优惠卷中间
     * @return 结果
     */
    @Override
    public int updateCarUserCoupon(CarUserCoupon carUserCoupon)
    {
        return carUserCouponMapper.updateCarUserCoupon(carUserCoupon);
    }

    /**
     * 批量删除用户优惠卷中间
     * 
     * @param ids 需要删除的用户优惠卷中间主键
     * @return 结果
     */
    @Override
    public int deleteCarUserCouponByIds(Long[] ids)
    {
        return carUserCouponMapper.deleteCarUserCouponByIds(ids);
    }

    /**
     * 删除用户优惠卷中间信息
     * 
     * @param id 用户优惠卷中间主键
     * @return 结果
     */
    @Override
    public int deleteCarUserCouponById(Long id)
    {
        return carUserCouponMapper.deleteCarUserCouponById(id);
    }
}
